package com.drojian.demo2.root_fragment;

import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.drojian.demo.R;
import com.drojian.demo2.broadcast.test1.MySendBroadcastActivity;
import com.drojian.demo2.cartoon.FrameCartoonActivity;


public class BroadcastFragment extends Fragment {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.part2_fragment_broadcast, container, false);
        Button viewById = view.findViewById(R.id.myself_b);
        viewById.setOnClickListener(v->startActivity(
                new Intent(getContext(), MySendBroadcastActivity.class)));
        return view;
    }

    public static BroadcastFragment newInstance() {
        return new BroadcastFragment();
    }
    


}